{% extends 'layout.html' %}
{% load static %}

{% block content %}
	<div class="container">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h2 class="panel-title" style="color: #0228e7"> 添加用户 </h2>
			</div>
			<div class="panel-body">
				<form method="post">
					{% csrf_token %}
					<div class="form-group">
						<label>姓名</label>
						<input type="text" class="form-control" placeholder="姓名" name="user">
					</div>
					<div class="form-group">
						<label>密码</label>
						<input type="text" class="form-control" placeholder="密码" name="pwd">
					</div>
					<div class="form-group">
						<label>年龄</label>
						<input type="text" class="form-control" placeholder="年龄" name="age">
					</div>
					<div class="form-group">
						<label>余额</label>
						<input type="text" class="form-control" placeholder="余额" name="ac">
					</div>
					<div class="form-group">
						<label>入职时间</label>
						<input type="text" id="dt" class="form-control" placeholder="入职时间" name="ctime">
					</div>
					<div class="form-group">
						<label>性别</label>
{#						<input type="text" class="form-control" placeholder="性别" name="age">#}
						<select class="form-control" name="gd">
							{% for g in gender_choice %}
							<option value="{{ g.0 }}">{{ g.1 }}</option>
							{% endfor %}
						</select>
					</div>
					<div class="form-group">
						<label>部门</label>
{#						<input type="text" class="form-control" placeholder="部门" name="age">#}
						<select class="form-control" name="dp">
							{% for d in dept %}
								<option value="{{ d.id }}">{{ d.title }}</option>
							{% endfor %}
						</select>
					</div>

					<button type="submit" class="btn btn-primary">提 交</button>
				</form>
			</div>
		</div>
	</div>
{% endblock %}

{% block css %}
	<link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/dist/css/bootstrap-datepicker.min.css' %}">
{% endblock %}


{% block js %}
	<script src="{% static '/plugins/bootstrap-3.4.1/dist/js/bootstrap-datepicker.js' %}"></script>
	<script src="{% static '/plugins/bootstrap-3.4.1/dist/js/bootstrap-datepicker.zh-CN.min.js' %}"></script>
	<script>
        $(function () {
            $('#dt').datepicker({
                format: 'yyyy-mm-dd',
                startDate: '0',
                language: 'zh-CN',
                autoclose: true
            });
        })
	</script>
{% endblock %}